package day230902;

import java.util.Scanner;

/**
 * @author 兴趣使然黄小黄
 * @version 1.0
 * @date 2023/9/2 19:41
 * 小美的数组 83.3%
 */
public class Main03 {

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNextInt()) {
            // 录入数据
            int n = in.nextInt();
            int[] arr = new int[n];
            int max = 0;
            for (int i = 0; i < n; i++) {
                arr[i] = in.nextInt();
                if (max < arr[i]) {
                    max = arr[i];
                }
            }
            int count = 0;
            while (arr[0] < max) {
                arr[0] *= 2;
                count++;
            }
            System.out.println(count);
        }
        in.close();
    }
}
